﻿@if (Request.IsAuthenticated) {
    <text>
        ¡Hola, @Html.ActionLink(User.Identity.Name, "Manage", "Account", routeValues: new { Area = "" }, htmlAttributes: new { @class = "username", title = "Manage" })!
        @using (Html.BeginForm("Logoff", "Account", new { Area = "" }, FormMethod.Post, new { id = "logoutForm" })) {
            @Html.AntiForgeryToken()
            <a href="javascript:document.getElementById('logoutForm').submit()">Log off</a>
        }

        @try
        {
            if (Roles.IsUserInRole("admin"))
            {
                @Html.ActionLink("Usuarios", "Index", "UserProfile", routeValues: new { Area = "Seguridad" }, htmlAttributes: new { id = "adminLink" })
            }
        }
        catch
        {
        }
        

    </text>
} else {
    <ul>
        <li>@Html.ActionLink("Regístrate", "Register", "Account", routeValues: new { Area = "" }, htmlAttributes: new { id = "registerLink" })</li>
        <li>@Html.ActionLink("Log in", "Login", "Account", routeValues: new { Area = "" }, htmlAttributes: new { id = "loginLink" })</li>
    </ul>
}
